package co.com.inventarios.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * MngmcnId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class MngmcnId implements java.io.Serializable {

	// Fields

	private String mcnempresa;
	private String mcnclase;
	private String mcnvinkey;
	private String mcntipodoc;
	private Double mcnnumedoc;
	private Double mcnreg;

	// Constructors

	/** default constructor */
	public MngmcnId() {
	}

	/** full constructor */
	public MngmcnId(String mcnempresa, String mcnclase, String mcnvinkey,
			String mcntipodoc, Double mcnnumedoc, Double mcnreg) {
		this.mcnempresa = mcnempresa;
		this.mcnclase = mcnclase;
		this.mcnvinkey = mcnvinkey;
		this.mcntipodoc = mcntipodoc;
		this.mcnnumedoc = mcnnumedoc;
		this.mcnreg = mcnreg;
	}

	// Property accessors

	@Column(name = "MCNEMPRESA", unique = false, nullable = false, insertable = true, updatable = true, length = 3)
	public String getMcnempresa() {
		return this.mcnempresa;
	}

	public void setMcnempresa(String mcnempresa) {
		this.mcnempresa = mcnempresa;
	}

	@Column(name = "MCNCLASE", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getMcnclase() {
		return this.mcnclase;
	}

	public void setMcnclase(String mcnclase) {
		this.mcnclase = mcnclase;
	}

	@Column(name = "MCNVINKEY", unique = false, nullable = false, insertable = true, updatable = true, length = 15)
	public String getMcnvinkey() {
		return this.mcnvinkey;
	}

	public void setMcnvinkey(String mcnvinkey) {
		this.mcnvinkey = mcnvinkey;
	}

	@Column(name = "MCNTIPODOC", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getMcntipodoc() {
		return this.mcntipodoc;
	}

	public void setMcntipodoc(String mcntipodoc) {
		this.mcntipodoc = mcntipodoc;
	}

	@Column(name = "MCNNUMEDOC", unique = false, nullable = false, insertable = true, updatable = true, precision = 13, scale = 1)
	public Double getMcnnumedoc() {
		return this.mcnnumedoc;
	}

	public void setMcnnumedoc(Double mcnnumedoc) {
		this.mcnnumedoc = mcnnumedoc;
	}

	@Column(name = "MCNREG", unique = false, nullable = false, insertable = true, updatable = true, precision = 8, scale = 1)
	public Double getMcnreg() {
		return this.mcnreg;
	}

	public void setMcnreg(Double mcnreg) {
		this.mcnreg = mcnreg;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MngmcnId))
			return false;
		MngmcnId castOther = (MngmcnId) other;

		return ((this.getMcnempresa() == castOther.getMcnempresa()) || (this
				.getMcnempresa() != null
				&& castOther.getMcnempresa() != null && this.getMcnempresa()
				.equals(castOther.getMcnempresa())))
				&& ((this.getMcnclase() == castOther.getMcnclase()) || (this
						.getMcnclase() != null
						&& castOther.getMcnclase() != null && this
						.getMcnclase().equals(castOther.getMcnclase())))
				&& ((this.getMcnvinkey() == castOther.getMcnvinkey()) || (this
						.getMcnvinkey() != null
						&& castOther.getMcnvinkey() != null && this
						.getMcnvinkey().equals(castOther.getMcnvinkey())))
				&& ((this.getMcntipodoc() == castOther.getMcntipodoc()) || (this
						.getMcntipodoc() != null
						&& castOther.getMcntipodoc() != null && this
						.getMcntipodoc().equals(castOther.getMcntipodoc())))
				&& ((this.getMcnnumedoc() == castOther.getMcnnumedoc()) || (this
						.getMcnnumedoc() != null
						&& castOther.getMcnnumedoc() != null && this
						.getMcnnumedoc().equals(castOther.getMcnnumedoc())))
				&& ((this.getMcnreg() == castOther.getMcnreg()) || (this
						.getMcnreg() != null
						&& castOther.getMcnreg() != null && this.getMcnreg()
						.equals(castOther.getMcnreg())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getMcnempresa() == null ? 0 : this.getMcnempresa()
						.hashCode());
		result = 37 * result
				+ (getMcnclase() == null ? 0 : this.getMcnclase().hashCode());
		result = 37 * result
				+ (getMcnvinkey() == null ? 0 : this.getMcnvinkey().hashCode());
		result = 37
				* result
				+ (getMcntipodoc() == null ? 0 : this.getMcntipodoc()
						.hashCode());
		result = 37
				* result
				+ (getMcnnumedoc() == null ? 0 : this.getMcnnumedoc()
						.hashCode());
		result = 37 * result
				+ (getMcnreg() == null ? 0 : this.getMcnreg().hashCode());
		return result;
	}

}